reading-notes

DSA Review

Whiteboard interview advices

Whiteboard interviews are a style of interview question that assesses both the technical and non-technical skills of a potential hire. They can either be a specific algorithm and data structure problem, or they can be a more abstract systems design and architecture-based question.

First Advice: Communicate!

The best piece of technical interview advice that have been received to people and can impart upon you is to communicate. This may seem like an anti-climactic piece of advice, but it’s actually the most important skill to prepare prior to an interview.

What Does it Mean to Communicate?

1. First, Restate the Question

Do you understand what they’re asking you to do? Prove it. Restate the question for them and seek affirmation. You might actually be surprised to find you don’t fully understand what they’re asking for — perhaps the question is similar, but not the same, as a practice problem you have completed in the past.

2. Second, Ask About Edge Cases

It’s still not time to dive right into coding the solution. Think for a bit about the inputs and expected output and think about potential edge cases to the problem. Ask about them. In many cases, the interviewer hasn’t even thought about edge cases and will make something up.

3. Third, Ask About Test Cases

This is free and you should take advantage of it. Simply ask if there are any test cases that the function should pass. Your interviewer might be expecting you to ask this question, so it might be necessary.

4. Fourth, Write Pseudocode and Ask If It Makes Sense

Again, you don’t actually want to start writing code in an actual language. You’ll find yourself constrained by trying to remember the methods or other idiosyncrasies of the language rather than trying to come up with the correct logic. Instead, let your interviewer know you’re going to start by writing pseudocode and fill in the actual code later.

you can ask if your pseudocode makes sense to the interviewer. It’s possible they will be the type that doesn’t want to “give you hints,” but it’s also possible they’ll be more interested in how you think and want to discuss your pseudocode with you.

Example of a valid Pseudo code:

function fizzBuzz(n) {
 // If n is not a number or not an integer greater 
 // than zero, return null
 
 // create empty array to store output
 
 // Loop through numbers from 1 to n
  // If number modulo 3 is zero and 
  // number modulo 5 is zero, add ‘fizzbuzz’ 
  // to array
 
  // Else If number modulo 3 is zero, add ‘fizz’ 
  // to output array
  // Else If number modulo 5 is zero, 
  // add ‘buzz’ to output array
  // Else add the number to the array
 
 // return output array
}

5. Fifth and last, Write the Actual Code and Ask if it Looks Good

You should now convert your pseudocode into actual code. You don’t even need to remove the comments. At this point, you just need to plug the appropriate code for your language in.

Bonus: Communicating Prior to the Interview

You should have a human resources or interview point of contact prior to the interview. Are you curious whether there will be a coding portion of the interview? Ask them! Furthermore, you can ask if there is anything in particular you should prepare.

tips to ace a programming interview

Software interviews are hard, Here are ways that help you to make them easier:

The technical interview is unlike any other job interview: it’s a specialized, rigorous process that tests your coding skills, problem-solving abilities, and personality.

Technical interviews success tips:

  1. Ask clarifying questions before you even start writing code.
  2. Talk through your code (think out loud) to give the interviewer a window into your thoughts.
  3. Speak clearly and precisely.
  4. If you’re stuck, stay calm, think out loud, and try new ideas